package com.d3works.apps.account.service;

import com.d3works.apps.account.db.DepositSlip;
import com.d3works.apps.account.db.PaymentVoucher;
import com.d3works.exception.D3worksException;
import java.io.IOException;
import java.time.LocalDate;
import java.util.List;

public interface DepositSlipService {

  /**
   * Get payments into deposit slip.
   *
   * @param depositSlip
   * @throws D3worksException
   */
  List<PaymentVoucher> fetchPaymentVouchers(DepositSlip depositSlip);

  /**
   * Publish deposit slip.
   *
   * @param depositSlip
   * @return
   * @throws D3worksException
   * @throws IOException
   */
  LocalDate publish(DepositSlip depositSlip) throws D3worksException;

  /**
   * Validate deposit slip using value for collection account.
   *
   * @param depositSlip
   * @return
   * @throws D3worksException
   * @throws IOException
   */
  void validate(DepositSlip depositSlip) throws D3worksException;
}
